package thuyan.dtvt.bkhn;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.ImageButton;

public class Play extends Activity {

	private ImageButton btAnimal, btPeople, btFruits, btOthers;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_play);

		btAnimal = (ImageButton) findViewById(R.id.animal);
		btAnimal.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

				doOpenPlaygameActivity();
			}
		});
		btPeople=(ImageButton)findViewById(R.id.people);
		btPeople.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(Play.this, Play_people.class);
				startActivity(myIntent);
			}
		});
		btFruits=(ImageButton)findViewById(R.id.fruits);
		btFruits.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(Play.this, Play_fruits.class);
				startActivity(myIntent);
			}
		});
		btOthers=(ImageButton)findViewById(R.id.others);
		btOthers.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(Play.this, Play_others.class);
				startActivity(myIntent);
			}
		});
	}

	public void doOpenPlaygameActivity() {
		Intent myIntent = new Intent(Play.this, Playgame.class);
		startActivity(myIntent);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.play, menu);
		return true;
	}

}
